package com.plian.system.dao.pm.contributor;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dao.DaoSupport;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class ContributorBasicsDao {
    @Resource(name = "daoSupport")
    private DaoSupport dao;

    /**
     * 批量新增
     * @param list
     */
    public void  saveAll(List<PageData> list) throws Exception {
        dao.save("ContributorBasicsMapper.saveAll",list);
    }

    /**
     * 根据主表删除
     * @param parentId
     */
    public void  del_parentId(String parentId) throws Exception {
        dao.delete("ContributorBasicsMapper.del_parentId",parentId);
    }

    /**
     * 根据主表Id查询数据
     * @param propertyId
     * @throws Exception
     */
    public List<PageData>  find_parentId(String propertyId) throws Exception {
      return (List<PageData>) dao.findForList("ContributorBasicsMapper.find_parentId",propertyId);
    }
    public List<PageData>  findByParentIds(List<String> propertyId) throws Exception {
      return (List<PageData>) dao.findForList("ContributorBasicsMapper.findByParentIds",propertyId);
    }


}
